<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title></title>
	<link rel="stylesheet" type="text/css" href="../css/zhuce.css"/>
	<script src="../js/jquery-1.11.3.js"></script>
	<script src="../js/cookie.js"></script>
</head>
<body>
 	<div id="head">
 		<div class="w">
 			<a href="#"><img src="../img/hd_logo.jpg"/></a>
 			<ul>
 				<li class="li1">如您已有账户<a href="#">请登录</a></li>
 				<li class="li2"><img src="../img/shezhi.jpg"><a href="#">帮助</a></li>
 				<li class="li3"><img src="../img/kefu.jpg"><a href="#">在线客服</a></li>
 			</ul>
 		</div>
 	</div>
 	<div id="body">
 		<div class="w">
 			<div class="b1">
 				<div class="lef">
 					<ul>
 						<li class="lef1"><a href="#">手机注册</a></li>
 						<li class="lef2"><a href="#">邮箱注册</a></li>
 					</ul>
 					<div class="ce">
 						<div class="shouji">手机号：<input type="text" />
 							<div class="s1"></div>
 							<div class="s2">请输入正确手机号</div>
 						</div>
 						<div class="shemi">设置密码：<input type="text" placeholder="6-20个非空格字符" />
 							<div class="s3"></div>
 							<div class="s4">请输入密码</div>
 						</div>
 						<div class="chongzhimi">重置密码：<input type="text" />
 							<div class="c1"></div>
 							<div class="c2">请输入相同的密码</div>
 						</div>
 						<div class="yanzheng">验证码：<input type="text" /></div>
 						<img src="../img/yanzheng.jpg"/>
 						<a class="a1" href="#">换一张</a>
 						<div class="jiaoyan">校验码：<input type="button" value="获取校验码"/>
 							<input class="j1" type="text"/>
 						</div>
 						<p>点击注册,表示您已同意购酒网<a href="#">《服务协议》</a></p>
 						<img class="btn" style="image" src="../img/zhuce.jpg"/>
 					</div>
 				</div>
 				<img class="zhujiu" src="../img/zhucejiu.jpg"/>
 			</div>
 			<ul class="b2">
 				<li><a href="#">关于我们</a></li>
 				<li><a href="#">联系我们</a></li>
 				<li><a href="#">人才招聘</a></li>
 				<li><a href="#">隐私声明</a></li>
 				<li><a href="#">帮助中心</a></li>
 				<li class="b21"><a href="#">友情链接</a></li>
 			</ul>
 			<div class="box">Copyright©2009-2013 gjw.com, All Rights Reserved 上海购酒网电子商务有限公司 版权所有</div>
 		</div>
 	</div>
</body>
<script>
	$(function(){
		$('.shouji input').blur(function(){
			var shouji=$('.shouji input').val();
			var reg=/^[1-3]\d{10}$/
			if(reg.test(shouji)){
				$('.shouji .s2').hide().prev().show()
				alert(1)
			}else{
				$('.shouji .s2').show()
				$('.shouji .s1').hide()
			}
		})
		
		$('.shemi input').blur(function(){
			var shemi=$('.shemi input').val();
			var reg=/^[^/s]{6,20}$/
			if(reg.test(shemi)){
				$('.shemi .s3').show().next().hide()
			}else{
				$('.shemi .s4').show().prev().hide()
			}
		})
		$('.chongzhimi input').blur(function(){
			var mi=$('.chongzhimi input').val();
			var shemi=$('.shemi input').val();
			if(mi==shemi){
				$('.chongzhimi .c1').show().next().hide()
			}else{
				$('.chongzhimi .c2').show().prev().hide()
			}
		})
		$('.btn').click(function(){
			var name=$('.shouji input').val()
			var pass=$('.shemi input').val()
			setCookie('name',name)
			setCookie('pass',pass)
			alert('注册成功')
			window.location.href="denglu.html"
		})
		
	})
</script>
</html>
